package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.DunningFromMapper;
import com.ruoyi.domain.DunningFrom;
import com.ruoyi.service.IDunningFromService;
import com.ruoyi.common.core.text.Convert;

/**
 * 催款申请单Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-09
 */
@Service
public class DunningFromServiceImpl implements IDunningFromService 
{
    @Autowired
    private DunningFromMapper dunningFromMapper;

    /**
     * 查询催款申请单
     * 
     * @param dId 催款申请单ID
     * @return 催款申请单
     */
    @Override
    public DunningFrom selectDunningFromById(Long dId)
    {
        return dunningFromMapper.selectDunningFromById(dId);
    }

    /**
     * 查询催款申请单列表
     * 
     * @param dunningFrom 催款申请单
     * @return 催款申请单
     */
    @Override
    public List<DunningFrom> selectDunningFromList(DunningFrom dunningFrom)
    {
        return dunningFromMapper.selectDunningFromList(dunningFrom);
    }

    @Override
    public List<DunningFrom> selectDunningFromListss(Long pId) {
        return dunningFromMapper.selectDunningFromListss(pId);
    }

    /**
     * 新增催款申请单
     * 
     * @param dunningFrom 催款申请单
     * @return 结果
     */
    @Override
    public int insertDunningFrom(DunningFrom dunningFrom)
    {
        return dunningFromMapper.insertDunningFrom(dunningFrom);
    }

    /**
     * 修改催款申请单
     * 
     * @param dunningFrom 催款申请单
     * @return 结果
     */
    @Override
    public int updateDunningFrom(DunningFrom dunningFrom)
    {
        return dunningFromMapper.updateDunningFrom(dunningFrom);
    }

    /**
     * 删除催款申请单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDunningFromByIds(String ids)
    {
        return dunningFromMapper.deleteDunningFromByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除催款申请单信息
     * 
     * @param dId 催款申请单ID
     * @return 结果
     */
    @Override
    public int deleteDunningFromById(Long dId)
    {
        return dunningFromMapper.deleteDunningFromById(dId);
    }

    @Override
    public List<DunningFrom> selectDunningFromLists(Long sId) {
        return dunningFromMapper.selectDunningFromLists(sId);
    }

    /**
     * 未付款提交到财务总监
     * @param dId
     * @return
     */
    @Override
    public int submitExaStatus(Long dId) {
        return dunningFromMapper.submitExaStatus(dId);
    }

    /**
     *  已付款
     * @param dId
     * @return
     */
    @Override
    public int overExaStatus(Long dId) {
        return dunningFromMapper.overExaStatus(dId);
    }

    /**
     *  总经理通过申请
     * @param dId
     * @return
     */
    @Override
    public int conExaStatus(Long dId) {
        return dunningFromMapper.conExaStatus(dId);
    }

    /**
     *  财务处理
     * @param dId
     * @return
     */
    @Override
    public int consExaStatus(Long dId) {
        return dunningFromMapper.consExaStatus(dId);
    }

    /**
     * 查询催款支付金额列表
     *
     * @param pId 催款申请
     * @return 催款申请集合
     */
    @Override
    public List<DunningFrom> selectId(Long pId) {
        return dunningFromMapper.selectId(pId);
    }
    /**
     * 导出所有
     *
     * @param df
     * @return 结果
     */

    @Override
    public List<DunningFrom> selectAllexport(DunningFrom df) {
        return dunningFromMapper.selectAllexport(df);
    }
}
